Author: Charles Tapley Hoyt
Estimated Run Time: 5 seconds
This notebook shows how a WikiPathways entry, distributed as BioPAX, can be loaded into PyBEL using INDRA.
In [1]:
import pkg_resources
import sys
import os
import time
from urllib.request import urlretrieve
import indra.util.get_version
import indra.java_vm # make sure INDRA is in charge of the JVM
import pybel
import pybel_tools
from pybel_tools.visualization import to_jupyter
In [2]:
%%bash
java -showversion 2>&1 | head -n 4
In [3]:
%%bash
locale
In [4]:
print(sys.version)
In [5]:
print(time.asctime())
In [6]:
os.environ['CLASSPATH']
Out[6]:
In [7]:
pybel.utils.get_version()
Out[7]:
In [8]:
pybel_tools.utils.get_version()
Out[8]:
In [9]:
pkg_resources.get_distribution("jnius-indra").version
Out[9]:
In [10]:
indra.util.get_version.get_version()
Out[10]:
The apoptosis pathway is downloaded from WikiPathways to the current user's downloads folder.
In [11]:
apoptosis_url = 'https://www.wikipathways.org//wpi/wpi.php?action=downloadFile&type=owl&pwTitle=Pathway:WP254&oldid=95107'
In [12]:
apoptosis_path = os.path.join(os.path.expanduser('~'), 'Downloads', 'WP254_95107.owl')
In [13]:
if not os.path.exists(apoptosis_path):
urlretrieve(apoptosis_url, apoptosis_path)
A file path is given to pybel.from_biopax, which wraps indra.sources.biopax.biopax_api.process_owl.
In [14]:
graph = pybel.from_biopax(apoptosis_path)
In [ ]:
to_jupyter(graph)